from flask import Flask
from flask import jsonify
from flask import render_template
from flask import request

from 钢铁网 import load_data as ld

app = Flask(__name__)


@app.route("/")
def index():
    return render_template("index.html")


@app.route("/load_data")
def load_data():
    city = request.args.get('city', default='福州')
    result = {
        "code": 0,
        "msg": "ok",
        "data": ld(city)
    }
    return jsonify(result)


app.run(debug=True)
